package com.wanxs.mall.product.service;

import com.wanxs.mall.common.page.PageData;
import com.wanxs.mall.common.service.CrudService;
import com.wanxs.mall.product.dto.AttrDTO;
import com.wanxs.mall.product.entity.AttrEntity;
import com.wanxs.mall.product.vo.AttrResponseVo;
import com.wanxs.mall.product.vo.AttrVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author wanxs 130001934@qq.com
 * @since 1.0.0 2023-09-01
 */
public interface AttrService extends CrudService<AttrEntity, AttrDTO> {

    List<AttrEntity> getRelationAttr(Long attrgroupId);

    PageData<AttrResponseVo> queryBasePage(Map<String, Object> params, Long catelogId, String attrType);


    void saveAttr(AttrVO attrVO);

    void deleteAttr(Long[] ids);

    @Transactional
    void updateBaseAttr(AttrVO attr);

    PageData<AttrEntity> getNoAttrRelation(Map<String, Object> params, Long attrGroupId);

    List<Long> selectSearchAttrIds(List<Long> attrIds);
}